// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import store from './store'
import router from './router'
import filters from './commons/filters'
import {AlertPlugin, ConfirmPlugin, ToastPlugin, DatetimePlugin} from 'vux'
import FastClick from 'fastclick'
import App from './App'
import API from './http/index'
import Bridge from './config/bridge.js'
import Mui from 'vue-awesome-mui';

// API全局绑定
Vue.use(API)
Vue.use(Mui);
// 去除手机端的快速点击
FastClick.attach(document.body)

Vue.prototype.$bridge = Bridge

// VUX 全局插件
Vue.use(AlertPlugin)
Vue.use(ConfirmPlugin)
Vue.use(ToastPlugin)
Vue.use(DatetimePlugin)

Vue.config.productionTip = false

// 共同过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app-box')
